
Security News
VulnCon 2025: NVD Scraps Industry Consortium Plan, Raising Questions About Reform
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
get-random-values
Advanced tools
`window.crypto.getRandomValues` with fallback to Node.js crypto
window.crypto.getRandomValues
or window.msCrypto.getRandomValues
or
require('crypto').randomBytes
or an Error.
var getRandomValues = require('get-random-values');
var array = new Uint32Array(10);
getRandomValues(array);
// => [
// => 183,
// => 76,
// => 18,
// => 177,
// => 73,
// => 9,
// => 50,
// => 248,
// => 216,
// => 104
// => ]
$ npm install get-random-values
var getRandomValues = require('get-random-values');
getRandomValues(buf)
Fills integer-based TypedArray buf
with cryptographically random numbers.
Checks for and uses the first of the following:
window.crypto.getRandomValues
window.msCrypto.getRandomValues
If none of the above are available, then an Error is thrown.
Throws QuotaExceededError if buf.length > 65536
(even if Node.js crypto,
which doesn't have that limit, is being used).
buf
must be a Uint8Array if Node.js crypto is used, otherwise a
TypeError will be thrown.
FAQs
`window.crypto.getRandomValues` with fallback to Node.js crypto
The npm package get-random-values receives a total of 179,096 weekly downloads. As such, get-random-values popularity was classified as popular.
We found that get-random-values demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.